<html xmlns:th="http://www.thymeleaf.org">

<head>
	<meta content="text/html;charset=UTF-8"/>
	<!--<link th:src="@{/bootstrap/css/bootstrap.min.css}" ref="stylesheet"/>
	<link th:src="@{/bootstrap/css/bootstrap-theme.min.css}" ref="stylesheet"/>-->
	<!-- bootstrap -->
	<link rel="stylesheet" href="/upload/static/bootstrap/css/bootstrap.min.css" />

	<!--<script src="/upload/static/js/test.js"></script>-->
	<script type="text/javascript" src="/upload/static/js/jquery-1.9.1.min.js"></script>
	<script>
	</script>
</head>

<body>
<div class="container">

<div th:if="${message}">
	<h3 th:text="${message}"/>
</div>

<!-- 新增提交 -->
<div>
	<form method="POST" action="/upload/m/">
		<div class="row">
			<div class="col-md-12">
			<table class="table table-condensed">
				<tr>
					<td class="col-md-1">新增</td>
					<td class="col-md-1"><input class="form-control" type="text"
							   					placeholder="模块编码" name="moduleCode"/></td>
					<td class="col-md-2"><input class="form-control" type="text"
							   					placeholder="模块名称" name="moduleName"/></td>
					<td class="col-md-1"><input class="form-control" type="text"
							   					placeholder="类型编码" name="typeCode" /></td>
					<td class="col-md-2"><input class="form-control" type="text"
							   					placeholder="类型名称" name="typeName" /></td>
					<td class="col-md-1"><input type="submit" value="新增提交" /></td>
				</tr>
			</table>
			</div>
		</div>
	</form>
</div>

<!-- 编辑提交 -->
<div th:if="${obj}">
	<form method="POST" action="/upload/m/uptSave/">
		<div class="row">
			<div class="col-md-12">
			<table class="table table-condensed">
				<tr>
					<td class="col-md-1">编辑</td>
					<td class="col-md-1"><input class="form-control" type="text" th:value="${obj.moduleCode}"
												placeholder="模块编码" name="moduleCode"/></td>
					<td class="col-md-2"><input class="form-control" type="text" th:value="${obj.moduleName}"
												placeholder="模块名称" name="moduleName"/></td>
					<td class="col-md-1"><input class="form-control" type="text" th:value="${obj.typeCode}"
												placeholder="类型编码" name="typeCode" /></td>
					<td class="col-md-2"><input class="form-control" type="text" th:value="${obj.typeName}"
												placeholder="类型名称" name="typeName" /></td>
					<td class="col-md-1"><input type="text" name="id" th:value="${obj.id}" hidden="hidden" />
						<input type="submit" value="编辑提交" />
					</td>
				</tr>
			</table>
			</div>
		</div>
	</form>
</div>

<!-- 查看、删除、编辑跳转 -->
<div class="panel panel-primary">
	<div class="panel-heading">
		<h3 class="panel-title">列表</h3>
	</div>
	<div class="row">
		<div class="col-md-12">
			<table class="table table-condensed table-striped">
				<thead>
				<tr>
					<th class="col-md-1">序号</th>
					<td class="col-md-1">模块编码:</td>
					<td class="col-md-2">模块名称:</td>
					<td class="col-md-1">类型编码:</td>
					<td class="col-md-2">类型名称:</td>
					<th class="col-md-1">操作</th>
				</tr>
				</thead>
				<tbody>
				<tr th:each="list,iterStat : ${lists}">
					<td th:text="${iterStat.count}"></td>
					<td th:text="${list.moduleCode}"></td>
					<td th:text="${list.moduleName}"></td>
					<td th:text="${list.typeCode}"></td>
					<td th:text="${list.typeName}"></td>
					<td>
						<!--<a href="#" role="button" data-toggle="modal"
						   th:onclick="'javascript:_removeId('+${list.id}+');'">删除</a>-->
						<!--
						<button th:onclick="'javascript:_edit('+${list.id}+');'"
								class="btn btn-xs btn-info">
							<i class="fa fa-pencil bigger-120"></i>编辑
						</button>
						<button th:onclick="'javascript:_removeId('+${list.id}+');'"
								class="btn btn-xs btn-danger btn-user-delete">
							<i class="fa fa-trash-o bigger-120"></i>删除
						</button>-->
						<table border="0" cellspacing="0" cellpadding="0">
						<tr>
						<th>
							<form method="POST" action="/upload/m/del/">
								<input type="text" name="id" th:value="${list.id}" hidden="hidden" />
								<input type="submit" value="删除" />
							</form>
						</th>
						<th>
							<form method="POST" action="/upload/m/uptSel/">
								<input type="text" name="id" th:value="${list.id}" hidden="hidden" />
								<input type="submit" value="编辑" />
							</form>
						</th>
						</tr>
						</table>
					</td>
				</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>
</div>
</body>
</html>
